<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>GadgetSplitter.pb</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font><font color="#3A3966">;   PureBasic - Gadget example file
</font><font color="#3A3966">;
</font><font color="#3A3966">;    (c) Fantaisie Software
</font><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font>
<font color="#924B72">#WindowWidth</font>  = 640
<font color="#924B72">#WindowHeight</font> = 480


<b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 100, 120, <font color="#924B72">#WindowWidth</font>, <font color="#924B72">#WindowHeight</font>, "PureBasic - Gadget Demonstration", <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font> | <font color="#924B72">#PB_Window_SizeGadget</font>)

<font color="#3A3966">  HyperLinkGadget</font>(7, 10, 5, 180, 30, "This is a green hyperlink",<font color="#3A3966"> RGB</font>(0,255,0))
<font color="#3A3966">  HyperLinkGadget</font>(8, 200, 5, 220, 30, "This is a red hyperlink",<font color="#3A3966"> RGB</font>(255,0,0))
  
<font color="#3A3966">  SetGadgetFont</font>(8,<font color="#3A3966"> LoadFont</font>(0, "courier", 10, <font color="#924B72">#PB_Font_Underline</font> | <font color="#924B72">#PB_Font_Bold</font>))

<font color="#3A3966">  ListIconGadget</font>(0, 115, 10, 100, 190, "Test", 100)
  <b><font color="#3A3966">For</font></b> k=0 <b><font color="#3A3966">To</font></b> 10
<font color="#3A3966">    AddGadgetItem</font>(0, -1, "Element "+<font color="#3A3966">Str</font>(k))
  <b><font color="#3A3966">Next</font></b>
  
<font color="#3A3966">  ExplorerListGadget</font>(1, 115, 10, 100, 190,<font color="#3A3966"> GetHomeDirectory</font>(), <font color="#924B72">#PB_Explorer_AlwaysShowSelection</font>|<font color="#924B72">#PB_Explorer_FullRowSelect</font>|<font color="#924B72">#PB_Explorer_MultiSelect</font>)

<font color="#3A3966">  TreeGadget</font>(3, 115, 10, 100, 190)
  
  <b><font color="#3A3966">For</font></b> k=0 <b><font color="#3A3966">To</font></b> 10
<font color="#3A3966">    AddGadgetItem</font>(3, -1, "Hello "+<font color="#3A3966">Str</font>(k))
  <b><font color="#3A3966">Next</font></b>

<font color="#3A3966">  PanelGadget</font>(6, 0, 0, 400, 400)
    <b><font color="#3A3966">For</font></b> k=0 <b><font color="#3A3966">To</font></b> 5
<font color="#3A3966">      AddGadgetItem</font>(6, -1, "Line "+<font color="#3A3966">Str</font>(k))
<font color="#3A3966">      ButtonGadget</font>(12+k, 10, 10, 100, 20, "Test"+<font color="#3A3966">Str</font>(k))
    <b><font color="#3A3966">Next</font></b>
<font color="#3A3966">  CloseGadgetList</font>()

<font color="#3A3966">  SplitterGadget</font>(2, 0, 0, <font color="#924B72">#WindowWidth</font>/2, <font color="#924B72">#WindowHeight</font>/2, 1, 0)
<font color="#3A3966">  SplitterGadget</font>(4, 0, 0, <font color="#924B72">#WindowWidth</font>, <font color="#924B72">#WindowHeight</font>, 3, 2, <font color="#924B72">#PB_Splitter_Vertical</font> | <font color="#924B72">#PB_Splitter_Separator</font>)
<font color="#3A3966">  SplitterGadget</font>(5, 5, 40, <font color="#924B72">#WindowWidth</font>-10, <font color="#924B72">#WindowHeight</font>-45, 4, 6, <font color="#924B72">#PB_Splitter_Vertical</font>)
  
<font color="#3A3966">  SetGadgetState</font>(5, 500)

  <b><font color="#3A3966">Repeat</font></b>
    Event =<font color="#3A3966"> WaitWindowEvent</font>()
    
    <b><font color="#3A3966">If</font></b> Event = <font color="#924B72">#PB_Event_Gadget</font>
      
      <b><font color="#3A3966">Select</font></b> <font color="#3A3966">EventGadget</font>()

        <b><font color="#3A3966">Case</font></b> 8
<font color="#3A3966">          SetGadgetState</font>(5, 333)
<font color="#3A3966">          SetGadgetState</font>(2, 333)
          
      <b><font color="#3A3966">EndSelect</font></b>
      

    <b><font color="#3A3966">ElseIf</font></b> Event = <font color="#924B72">#PB_Event_SizeWindow</font>
<font color="#3A3966">      ResizeGadget</font>(5, <font color="#924B72">#PB_Ignore</font>, <font color="#924B72">#PB_Ignore</font>,<font color="#3A3966"> WindowWidth</font>(0)-10,<font color="#3A3966"> WindowHeight</font>(0)-45) <font color="#3A3966">; Our 'master' splitter gadget
</font>
    <b><font color="#3A3966">EndIf</font></b>

  
  <b><font color="#3A3966">Until</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>

<b><font color="#3A3966">EndIf</font></b>

<b><font color="#3A3966">End</font></b>  </font></pre>
</body></html>
